home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Turnbull China Bikeride
/
Turnbull China Bikeride - Disc 2.iso
/
BARNET
/
COMPILER
/
SATHER
/
!Sather
/
Library
/
Containrs
/
sa
/
h_map
< prev
next >
Wrap
Text File
|
1996-04-09
|
1KB
|
34 lines
---------------------------> Sather 1.1 source file <--------------------------
-- h_map.sa: Hash table based map class
-- Author: Benedict A. Gomes <gomes@samosa.ICSI.Berkeley.EDU>
-- Copyright (C) 1995, International Computer Science Institute
-- $Id: h_map.sa,v 1.3 1996/04/09 10:05:04 borisv Exp $
--
-- COPYRIGHT NOTICE: This code is provided WITHOUT ANY WARRANTY
-- and is subject to the terms of the SATHER LIBRARY GENERAL PUBLIC
-- LICENSE contained in the file: Sather/Doc/License of the
-- Sather distribution. The license is also available from ICSI,
-- 1947 Center St., Suite 600, Berkeley CA 94704, USA.
-------------------------------------------------------------------
class H_MAP{K,E} < $MAP{K,E} is
-- Hash table based on data buckets
private include DYNAMIC_DATABUCKET_TABLE{K,E}
-- Make public
create->create,
map_has_ind->has_ind,
map_copy->copy,
map_pair!->pair!,
map_elt!->elt!,
map_key!->ind!,
map_delete->delete,
map_aget->aget,
map_aset->aset;
include MAP_INCL{K,E};
delete(k:K) pre ~void(self) is dummy ::= delete(k) end;
size: INT is return n_inds end;
end; -- H_MAP{K,E}
--=============================================================================